import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '统计日期',
    align: 'center',
    dataIndex: 'totalDate',
  },
  {
    title: '当日累计发放金币数量',
    align: 'center',
    dataIndex: 'totalGold',
  },
  {
    title: '当日累计发放补贴金币',
    align: 'center',
    dataIndex: 'totalSubsidyGold',
  },
  {
    title: '当日累计赚取ecpm',
    align: 'center',
    dataIndex: 'totalEcpm',
  },
];
//查询数据
export const searchFormSchema: FormSchema[] = [];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '统计日期',
    field: 'totalDate',
    component: 'DatePicker',
    componentProps: {
      showTime: true,
      valueFormat: 'YYYY-MM-DD HH:mm:ss',
    },
  },
  {
    label: '当日累计发放金币数量',
    field: 'totalGold',
    component: 'InputNumber',
  },
  {
    label: '当日累计发放补贴金币',
    field: 'totalSubsidyGold',
    component: 'InputNumber',
  },
  {
    label: '当日累计赚取ecpm',
    field: 'totalEcpm',
    component: 'InputNumber',
  },
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false,
	},
];

// 高级查询数据
export const superQuerySchema = {
  totalDate: { title: '统计日期', order: 0, view: 'datetime', type: 'string' },
  totalGold: { title: '当日累计发放金币数量', order: 1, view: 'number', type: 'number' },
  totalSubsidyGold: { title: '当日累计发放补贴金币', order: 2, view: 'number', type: 'number' },
  totalEcpm: { title: '当日累计赚取ecpm', order: 3, view: 'number', type: 'number' },
};

/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[] {
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}